<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
  <head>
    <title></title>
    <meta charset="UTF-8">
    <script src="../../tools/test/htmltest.js"></script>
    <script src="../../node_modules/chai/chai.js"></script>
    <script src="../../platform.js" debug></script>
    <link rel="import" href="includes/import-file.html">
  </head>
  <body>
    <script>
      window.addEventListener('HTMLImportsLoaded', function() {
        window.importsOk = true;
      });
      window.addEventListener('WebComponentsReady', function() {
        chai.assert.ok(window.importsOk, 'WebComponentsReady without HTMLImportsLoaded');
        chai.assert.ok(window.importTest, 'import failed to set global value');
        var elt = document.createElement('import-test');
        chai.assert.ok(elt.ready, 'import failed to register custom element');
        done();
      });
    </script>
  </body>
</html>
